3.1126 \(\int x^2 (d+e x^2)^2 (a+b \tan ^{-1}(c x)) \, dx\)

Optimal. Leaf size=161 \[ \frac {1}{3} d^2 x^3 \left (a+b \tan ^{-1}(c x)\right )+\frac {2}{5} d e x^5 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{7} e^2 x^7 \left (a+b \tan ^{-1}(c x)\right )-\frac {b e x^4 \left (14 c^2 d-5 e\right )}{140 c^3}+\frac {b \left (35 c^4 d^2-42 c^2 d e+15 e^2\right ) \log \left (c^2 x^2+1\right )}{210 c^7}-\frac {b x^2 \left (35 c^4 d^2-42 c^2 d e+15 e^2\right )}{210 c^5}-\frac {b e^2 x^6}{42 c} \]

[Out]

-1/210*b*(35*c^4*d^2-42*c^2*d*e+15*e^2)*x^2/c^5-1/140*b*(14*c^2*d-5*e)*e*x^4/c^3-1/42*b*e^2*x^6/c+1/3*d^2*x^3*
(a+b*arctan(c*x))+2/5*d*e*x^5*(a+b*arctan(c*x))+1/7*e^2*x^7*(a+b*arctan(c*x))+1/210*b*(35*c^4*d^2-42*c^2*d*e+1
5*e^2)*ln(c^2*x^2+1)/c^7

________________________________________________________________________________________

Rubi [A]  time = 0.25, antiderivative size = 161, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {270, 4976, 12, 1251, 771} \[ \frac {1}{3} d^2 x^3 \left (a+b \tan ^{-1}(c x)\right )+\frac {2}{5} d e x^5 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{7} e^2 x^7 \left (a+b \tan ^{-1}(c x)\right )-\frac {b x^2 \left (35 c^4 d^2-42 c^2 d e+15 e^2\right )}{210 c^5}+\frac {b \left (35 c^4 d^2-42 c^2 d e+15 e^2\right ) \log \left (c^2 x^2+1\right )}{210 c^7}-\frac {b e x^4 \left (14 c^2 d-5 e\right )}{140 c^3}-\frac {b e^2 x^6}{42 c} \]

Antiderivative was successfully verified.

[In]

Int[x^2*(d + e*x^2)^2*(a + b*ArcTan[c*x]),x]

[Out]

-(b*(35*c^4*d^2 - 42*c^2*d*e + 15*e^2)*x^2)/(210*c^5) - (b*(14*c^2*d - 5*e)*e*x^4)/(140*c^3) - (b*e^2*x^6)/(42
*c) + (d^2*x^3*(a + b*ArcTan[c*x]))/3 + (2*d*e*x^5*(a + b*ArcTan[c*x]))/5 + (e^2*x^7*(a + b*ArcTan[c*x]))/7 +
(b*(35*c^4*d^2 - 42*c^2*d*e + 15*e^2)*Log[1 + c^2*x^2])/(210*c^7)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 270

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 771

Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> In
t[ExpandIntegrand[(d + e*x)^m*(f + g*x)*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, m}, x] && N
eQ[b^2 - 4*a*c, 0] && IntegerQ[p] && (GtQ[p, 0] || (EqQ[a, 0] && IntegerQ[m]))

Rule 1251

Int[(x_)^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Dist[1/2,
Subst[Int[x^((m - 1)/2)*(d + e*x)^q*(a + b*x + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, b, c, d, e, p, q}, x] &&
 IntegerQ[(m - 1)/2]

Rule 4976

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*((f_.)*(x_))^(m_.)*((d_.) + (e_.)*(x_)^2)^(q_.), x_Symbol] :> With[{u =
 IntHide[(f*x)^m*(d + e*x^2)^q, x]}, Dist[a + b*ArcTan[c*x], u, x] - Dist[b*c, Int[SimplifyIntegrand[u/(1 + c^
2*x^2), x], x], x]] /; FreeQ[{a, b, c, d, e, f, m, q}, x] && ((IGtQ[q, 0] &&  !(ILtQ[(m - 1)/2, 0] && GtQ[m +
2*q + 3, 0])) || (IGtQ[(m + 1)/2, 0] &&  !(ILtQ[q, 0] && GtQ[m + 2*q + 3, 0])) || (ILtQ[(m + 2*q + 1)/2, 0] &&
  !ILtQ[(m - 1)/2, 0]))

Rubi steps

\begin {align*} \int x^2 \left (d+e x^2\right )^2 \left (a+b \tan ^{-1}(c x)\right ) \, dx &=\frac {1}{3} d^2 x^3 \left (a+b \tan ^{-1}(c x)\right )+\frac {2}{5} d e x^5 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{7} e^2 x^7 \left (a+b \tan ^{-1}(c x)\right )-(b c) \int \frac {x^3 \left (35 d^2+42 d e x^2+15 e^2 x^4\right )}{105 \left (1+c^2 x^2\right )} \, dx\\ &=\frac {1}{3} d^2 x^3 \left (a+b \tan ^{-1}(c x)\right )+\frac {2}{5} d e x^5 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{7} e^2 x^7 \left (a+b \tan ^{-1}(c x)\right )-\frac {1}{105} (b c) \int \frac {x^3 \left (35 d^2+42 d e x^2+15 e^2 x^4\right )}{1+c^2 x^2} \, dx\\ &=\frac {1}{3} d^2 x^3 \left (a+b \tan ^{-1}(c x)\right )+\frac {2}{5} d e x^5 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{7} e^2 x^7 \left (a+b \tan ^{-1}(c x)\right )-\frac {1}{210} (b c) \operatorname {Subst}\left (\int \frac {x \left (35 d^2+42 d e x+15 e^2 x^2\right )}{1+c^2 x} \, dx,x,x^2\right )\\ &=\frac {1}{3} d^2 x^3 \left (a+b \tan ^{-1}(c x)\right )+\frac {2}{5} d e x^5 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{7} e^2 x^7 \left (a+b \tan ^{-1}(c x)\right )-\frac {1}{210} (b c) \operatorname {Subst}\left (\int \left (\frac {35 c^4 d^2-42 c^2 d e+15 e^2}{c^6}+\frac {3 \left (14 c^2 d-5 e\right ) e x}{c^4}+\frac {15 e^2 x^2}{c^2}+\frac {-35 c^4 d^2+42 c^2 d e-15 e^2}{c^6 \left (1+c^2 x\right )}\right ) \, dx,x,x^2\right )\\ &=-\frac {b \left (35 c^4 d^2-42 c^2 d e+15 e^2\right ) x^2}{210 c^5}-\frac {b \left (14 c^2 d-5 e\right ) e x^4}{140 c^3}-\frac {b e^2 x^6}{42 c}+\frac {1}{3} d^2 x^3 \left (a+b \tan ^{-1}(c x)\right )+\frac {2}{5} d e x^5 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{7} e^2 x^7 \left (a+b \tan ^{-1}(c x)\right )+\frac {b \left (35 c^4 d^2-42 c^2 d e+15 e^2\right ) \log \left (1+c^2 x^2\right )}{210 c^7}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.13, size = 162, normalized size = 1.01 \[ \frac {c^2 x^2 \left (4 a c^5 x \left (35 d^2+42 d e x^2+15 e^2 x^4\right )-2 b c^4 \left (35 d^2+21 d e x^2+5 e^2 x^4\right )+3 b c^2 e \left (28 d+5 e x^2\right )-30 b e^2\right )+4 b c^7 x^3 \tan ^{-1}(c x) \left (35 d^2+42 d e x^2+15 e^2 x^4\right )+2 b \left (35 c^4 d^2-42 c^2 d e+15 e^2\right ) \log \left (c^2 x^2+1\right )}{420 c^7} \]

Antiderivative was successfully verified.

[In]

Integrate[x^2*(d + e*x^2)^2*(a + b*ArcTan[c*x]),x]

[Out]

(c^2*x^2*(-30*b*e^2 + 3*b*c^2*e*(28*d + 5*e*x^2) - 2*b*c^4*(35*d^2 + 21*d*e*x^2 + 5*e^2*x^4) + 4*a*c^5*x*(35*d
^2 + 42*d*e*x^2 + 15*e^2*x^4)) + 4*b*c^7*x^3*(35*d^2 + 42*d*e*x^2 + 15*e^2*x^4)*ArcTan[c*x] + 2*b*(35*c^4*d^2
- 42*c^2*d*e + 15*e^2)*Log[1 + c^2*x^2])/(420*c^7)

________________________________________________________________________________________

fricas [A]  time = 0.42, size = 186, normalized size = 1.16 \[ \frac {60 \, a c^{7} e^{2} x^{7} + 168 \, a c^{7} d e x^{5} - 10 \, b c^{6} e^{2} x^{6} + 140 \, a c^{7} d^{2} x^{3} - 3 \, {\left (14 \, b c^{6} d e - 5 \, b c^{4} e^{2}\right )} x^{4} - 2 \, {\left (35 \, b c^{6} d^{2} - 42 \, b c^{4} d e + 15 \, b c^{2} e^{2}\right )} x^{2} + 4 \, {\left (15 \, b c^{7} e^{2} x^{7} + 42 \, b c^{7} d e x^{5} + 35 \, b c^{7} d^{2} x^{3}\right )} \arctan \left (c x\right ) + 2 \, {\left (35 \, b c^{4} d^{2} - 42 \, b c^{2} d e + 15 \, b e^{2}\right )} \log \left (c^{2} x^{2} + 1\right )}{420 \, c^{7}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(e*x^2+d)^2*(a+b*arctan(c*x)),x, algorithm="fricas")

[Out]

1/420*(60*a*c^7*e^2*x^7 + 168*a*c^7*d*e*x^5 - 10*b*c^6*e^2*x^6 + 140*a*c^7*d^2*x^3 - 3*(14*b*c^6*d*e - 5*b*c^4
*e^2)*x^4 - 2*(35*b*c^6*d^2 - 42*b*c^4*d*e + 15*b*c^2*e^2)*x^2 + 4*(15*b*c^7*e^2*x^7 + 42*b*c^7*d*e*x^5 + 35*b
*c^7*d^2*x^3)*arctan(c*x) + 2*(35*b*c^4*d^2 - 42*b*c^2*d*e + 15*b*e^2)*log(c^2*x^2 + 1))/c^7

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \mathit {sage}_{0} x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(e*x^2+d)^2*(a+b*arctan(c*x)),x, algorithm="giac")

[Out]

sage0*x

________________________________________________________________________________________

maple [A]  time = 0.04, size = 192, normalized size = 1.19 \[ \frac {a \,e^{2} x^{7}}{7}+\frac {2 a e d \,x^{5}}{5}+\frac {a \,d^{2} x^{3}}{3}+\frac {b \arctan \left (c x \right ) e^{2} x^{7}}{7}+\frac {2 b \arctan \left (c x \right ) e d \,x^{5}}{5}+\frac {b \arctan \left (c x \right ) d^{2} x^{3}}{3}-\frac {b \,d^{2} x^{2}}{6 c}-\frac {b e d \,x^{4}}{10 c}-\frac {b \,e^{2} x^{6}}{42 c}+\frac {b \,x^{2} d e}{5 c^{3}}+\frac {b \,x^{4} e^{2}}{28 c^{3}}-\frac {b \,x^{2} e^{2}}{14 c^{5}}+\frac {b \,d^{2} \ln \left (c^{2} x^{2}+1\right )}{6 c^{3}}-\frac {b \ln \left (c^{2} x^{2}+1\right ) e d}{5 c^{5}}+\frac {b \ln \left (c^{2} x^{2}+1\right ) e^{2}}{14 c^{7}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(e*x^2+d)^2*(a+b*arctan(c*x)),x)

[Out]

1/7*a*e^2*x^7+2/5*a*e*d*x^5+1/3*a*d^2*x^3+1/7*b*arctan(c*x)*e^2*x^7+2/5*b*arctan(c*x)*e*d*x^5+1/3*b*arctan(c*x
)*d^2*x^3-1/6*b*d^2*x^2/c-1/10/c*b*e*d*x^4-1/42*b*e^2*x^6/c+1/5/c^3*b*x^2*d*e+1/28/c^3*b*x^4*e^2-1/14/c^5*b*x^
2*e^2+1/6*b*d^2*ln(c^2*x^2+1)/c^3-1/5/c^5*b*ln(c^2*x^2+1)*e*d+1/14/c^7*b*ln(c^2*x^2+1)*e^2

________________________________________________________________________________________

maxima [A]  time = 0.32, size = 181, normalized size = 1.12 \[ \frac {1}{7} \, a e^{2} x^{7} + \frac {2}{5} \, a d e x^{5} + \frac {1}{3} \, a d^{2} x^{3} + \frac {1}{6} \, {\left (2 \, x^{3} \arctan \left (c x\right ) - c {\left (\frac {x^{2}}{c^{2}} - \frac {\log \left (c^{2} x^{2} + 1\right )}{c^{4}}\right )}\right )} b d^{2} + \frac {1}{10} \, {\left (4 \, x^{5} \arctan \left (c x\right ) - c {\left (\frac {c^{2} x^{4} - 2 \, x^{2}}{c^{4}} + \frac {2 \, \log \left (c^{2} x^{2} + 1\right )}{c^{6}}\right )}\right )} b d e + \frac {1}{84} \, {\left (12 \, x^{7} \arctan \left (c x\right ) - c {\left (\frac {2 \, c^{4} x^{6} - 3 \, c^{2} x^{4} + 6 \, x^{2}}{c^{6}} - \frac {6 \, \log \left (c^{2} x^{2} + 1\right )}{c^{8}}\right )}\right )} b e^{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(e*x^2+d)^2*(a+b*arctan(c*x)),x, algorithm="maxima")

[Out]

1/7*a*e^2*x^7 + 2/5*a*d*e*x^5 + 1/3*a*d^2*x^3 + 1/6*(2*x^3*arctan(c*x) - c*(x^2/c^2 - log(c^2*x^2 + 1)/c^4))*b
*d^2 + 1/10*(4*x^5*arctan(c*x) - c*((c^2*x^4 - 2*x^2)/c^4 + 2*log(c^2*x^2 + 1)/c^6))*b*d*e + 1/84*(12*x^7*arct
an(c*x) - c*((2*c^4*x^6 - 3*c^2*x^4 + 6*x^2)/c^6 - 6*log(c^2*x^2 + 1)/c^8))*b*e^2

________________________________________________________________________________________

mupad [B]  time = 0.79, size = 191, normalized size = 1.19 \[ \frac {a\,d^2\,x^3}{3}+\frac {a\,e^2\,x^7}{7}+\frac {b\,d^2\,\ln \left (c^2\,x^2+1\right )}{6\,c^3}+\frac {b\,e^2\,\ln \left (c^2\,x^2+1\right )}{14\,c^7}-\frac {b\,d^2\,x^2}{6\,c}-\frac {b\,e^2\,x^6}{42\,c}+\frac {b\,e^2\,x^4}{28\,c^3}-\frac {b\,e^2\,x^2}{14\,c^5}+\frac {2\,a\,d\,e\,x^5}{5}+\frac {b\,d^2\,x^3\,\mathrm {atan}\left (c\,x\right )}{3}+\frac {b\,e^2\,x^7\,\mathrm {atan}\left (c\,x\right )}{7}-\frac {b\,d\,e\,\ln \left (c^2\,x^2+1\right )}{5\,c^5}-\frac {b\,d\,e\,x^4}{10\,c}+\frac {b\,d\,e\,x^2}{5\,c^3}+\frac {2\,b\,d\,e\,x^5\,\mathrm {atan}\left (c\,x\right )}{5} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(a + b*atan(c*x))*(d + e*x^2)^2,x)

[Out]

(a*d^2*x^3)/3 + (a*e^2*x^7)/7 + (b*d^2*log(c^2*x^2 + 1))/(6*c^3) + (b*e^2*log(c^2*x^2 + 1))/(14*c^7) - (b*d^2*
x^2)/(6*c) - (b*e^2*x^6)/(42*c) + (b*e^2*x^4)/(28*c^3) - (b*e^2*x^2)/(14*c^5) + (2*a*d*e*x^5)/5 + (b*d^2*x^3*a
tan(c*x))/3 + (b*e^2*x^7*atan(c*x))/7 - (b*d*e*log(c^2*x^2 + 1))/(5*c^5) - (b*d*e*x^4)/(10*c) + (b*d*e*x^2)/(5
*c^3) + (2*b*d*e*x^5*atan(c*x))/5

________________________________________________________________________________________

sympy [A]  time = 2.74, size = 245, normalized size = 1.52 \[ \begin {cases} \frac {a d^{2} x^{3}}{3} + \frac {2 a d e x^{5}}{5} + \frac {a e^{2} x^{7}}{7} + \frac {b d^{2} x^{3} \operatorname {atan}{\left (c x \right )}}{3} + \frac {2 b d e x^{5} \operatorname {atan}{\left (c x \right )}}{5} + \frac {b e^{2} x^{7} \operatorname {atan}{\left (c x \right )}}{7} - \frac {b d^{2} x^{2}}{6 c} - \frac {b d e x^{4}}{10 c} - \frac {b e^{2} x^{6}}{42 c} + \frac {b d^{2} \log {\left (x^{2} + \frac {1}{c^{2}} \right )}}{6 c^{3}} + \frac {b d e x^{2}}{5 c^{3}} + \frac {b e^{2} x^{4}}{28 c^{3}} - \frac {b d e \log {\left (x^{2} + \frac {1}{c^{2}} \right )}}{5 c^{5}} - \frac {b e^{2} x^{2}}{14 c^{5}} + \frac {b e^{2} \log {\left (x^{2} + \frac {1}{c^{2}} \right )}}{14 c^{7}} & \text {for}\: c \neq 0 \\a \left (\frac {d^{2} x^{3}}{3} + \frac {2 d e x^{5}}{5} + \frac {e^{2} x^{7}}{7}\right ) & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(e*x**2+d)**2*(a+b*atan(c*x)),x)

[Out]

Piecewise((a*d**2*x**3/3 + 2*a*d*e*x**5/5 + a*e**2*x**7/7 + b*d**2*x**3*atan(c*x)/3 + 2*b*d*e*x**5*atan(c*x)/5
 + b*e**2*x**7*atan(c*x)/7 - b*d**2*x**2/(6*c) - b*d*e*x**4/(10*c) - b*e**2*x**6/(42*c) + b*d**2*log(x**2 + c*
*(-2))/(6*c**3) + b*d*e*x**2/(5*c**3) + b*e**2*x**4/(28*c**3) - b*d*e*log(x**2 + c**(-2))/(5*c**5) - b*e**2*x*
*2/(14*c**5) + b*e**2*log(x**2 + c**(-2))/(14*c**7), Ne(c, 0)), (a*(d**2*x**3/3 + 2*d*e*x**5/5 + e**2*x**7/7),
 True))

________________________________________________________________________________________